package com.lagou.client;

import com.lagou.service.UserService;
import com.lagou.service.pojo.RpcRequest;

public class ClientBootStrap {

    public static  final String providerName="UserService#sayHello#";

    public static void main(String[] args) throws InterruptedException {

        RpcConsumer rpcConsumer = new RpcConsumer();
        UserService proxy = (UserService) rpcConsumer.createProxy(UserService.class, providerName);

        while (true){
            Thread.sleep(2000);
            Object[] objects = {1,2,3,4,5,6};
            Class[] classes = {Integer.class};
            RpcRequest rpcRequest = new RpcRequest("requestId", "className", "methodName", classes, objects);
            System.out.println(proxy.sendRpc(rpcRequest));
        }

    }

}
